//
//
//

#ifndef XLISP_XLISPP_H
#define XLISP_XLISPP_H

extern "C" typedef struct _xlCallbacks xlCallbacks;

namespace xlispqt {
#if 0
}
#endif

class XlispEngine {
public:
	class CbProvider {
	public:
		virtual void setupCallbacks(XlispEngine *) const = 0;
	};

	XlispEngine(int argc, char **argv, CbProvider const *cb_provider = 0);
	virtual ~XlispEngine();

public:
	void setConsoleGetCCB(int (*consoleGetC)(void));
    void setConsoleFlushInputCB(void (*consoleFlushInput)(void));
    void setConsolePutCCB(void (*consolePutC)(int ch));
    void setConsoleFlushOutputCB(void (*consoleFlushOutput)(void));
    void setConsoleAtBOLPCB(int (*consoleAtBOLP)(void));
    void setConsoleCheckCB(int (*consoleCheck)(void));
	void setExitCB(void (*exit)(int sts));

public:
	int eval(const char *text);
private:
	xlCallbacks *m_callbacks;
};

}

#endif
